<include file="__THEME__/public_header" />
<style>
  .pic-size {
    max-width: 400px;
    max-height: 200px;
    _width: 400px;
    _height: 200px;
    padding-top: 5px;
  }
  .input-file {
    vertical-align: 2px;
    padding: 4px;
    font-size: 12px;
    color: #535353;
    border: #dcdcdc solid 1px;
    width: 346px;
  }
  #divup_1 p {
    color: #7d7d7d;
    line-height: 20px;
    margin: 5px 0;
    padding: 0;
  }
</style>
<div class="contentbox">
  <div class="zx-ldetail">
    <ul class="release-con">
      <li class="li">
        <label class="label">造型装备标题</label>
        <input class="inputcheckbox input" id="subject-title" type="text" name="subject">
      </li>
      <li class="li">
        <label class="label">造型装备分类</label>
        <div class="div" id="subject-cate">
          <?php foreach ($cates as $cate) { ?>
          <span class="span" data-cid="{$cate['id']}">{$cate[name]}</span>
          <?php } ?>
        </div>
      </li>
      <li class="li">
        <label class="form-tt">封面图</label>
        <div class="div">
          <FORM style='display:inline;padding:0;margin:0;border:0'>
            <div id="divup_1" type="file" rel="1">
              <input class="input-file" type="file" name="attach" rel="1" onchange="upload('logo',this)" urlquery='attach_type=admin_image&upload_type=image&thumb=1'>
              <div id='show_logo'></div>
              <p>建议大小：205px*160px</p>
            </div>
            <php>if($logo && is_numeric($logo)){</php>
            <img src="{$logo|getImageUrlByAttachId}" class="pic-size">
            <php>}</php>
          </FORM>
        </div>
        <input name="logo" id="form_logo" type="hidden" value="{$logo}" class="s-txt" style="width:350px;" />
      </li>
      <li class="li">
        <label class="label">造型装备摘要</label>
        <input class="inputcheckbox input" id="subject-abstract" type="text" name="abstract">
      </li>
      <li class="li">
        <label class="label">造型装备内容</label>
        <div class="div">
          {:W('UM', array('width' => 575, 'contentName' => 'subject-content'))}
        </div>
      </li>
      <li class="li">
        <button class="input inputcheckbox button" id="subject-submit" type="submit" data-uri="{:U('zhuang/Index/postRelease')}">提交</button>
      </li>
    </ul>
  </div>
  <div class="zx-right">
    <div class="title"><span>投稿指南</span></div>
    <div style="line-height:2em">{$guide}</div>
  </div>
</div>
<script>
  var upload = function(type,obj){
    if("undefined"  != typeof(core.uploadFile)){
      core.uploadFile.filehash = new Array();
    }
    core.plugInit('uploadFile',obj,function(data){
      // $('.input-content').remove();
      $(obj).val('');
      $('#show_'+type).html('<img class="pic-size" src="'+data.src+'">');
      $('#form_'+type).val(data.attach_id);
    },'image');
  };
</script>
<include file="__THEME__/public_footer" />